home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-25 | 1.2 KB | 43 lines | [TEXT/PJMM] |
- {Minimal demo program, with a few sprites moving back and forth.}
-
- program SATminimal;
-
- uses
- {$ifc UNDEFINED THINK_PASCAL}
- Types, QuickDraw, Menus, Windows, TextEdit, Fonts,
- Dialogs, Memory, {}
- {$endc}
- SAT, sMySprite;
- var
- ignoreSp: SpritePtr;
- l: longint;
- begin
- {Standard Inits are done by Think Pascal.}
- {$ifc UNDEFINED THINK_PASCAL}
- SATInitToolbox;
- {$endc}
-
- {Initialize, using PICTs 128 or 129 as background, Classic-sized drawing area}
- SATInit(128, 129, 512, 322);
-
- {Initialize sprite unit(s), by preloading faces and sounds}
- InitMySprite;
-
- {Make some sprites}
- ignoreSp := SATNewSprite(0, 50, 50, @SetupMySprite);
- ignoreSp := SATNewSprite(0, 100, 100, @SetupMySprite);
- ignoreSp := SATNewSprite(0, 125, 120, @SetupMySprite);
- ignoreSp := SATNewSprite(0, 150, 140, @SetupMySprite);
- ignoreSp := SATNewSprite(0, 200, 180, @SetupMySprite);
- ignoreSp := SATNewSprite(0, 250, 200, @SetupMySprite);
- ignoreSp := SATNewSprite(0, 300, 250, @SetupMySprite);
-
- repeat
- l := TickCount;
- SATRun(true); {Run one frame of animation}
- while l > TickCount - 3 do {Maximize speed to 20 fps}
- ;
- until Button;
-
- SATSoundShutUp; {Always de-allocate the sound channel before quitting!}
- end.